package com.zhixiao.user.util.impl;

import com.zhixiao.user.util.IdGenerator;

import java.util.UUID;


public class UUIDGenerator implements IdGenerator {

    /**
     * 通过UUID转字符串作为唯一ID
     *
     * @return String 6840c370-9769-43da-b381-0f89b52a4553
     */
    @Override
    public String generateId() {
        UUID uuid = UUID.randomUUID();
        return uuid.toString();
    }
}
